package com.ecoolex.discount.sales.entity;

import com.ecoolex.framework.common.annotation.Description;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import org.springframework.lang.NonNull;

/**
 *
 *   券猫订单<br>
 *<br>
 * 数据表： quan_mao_card_order
 *
 */
@Description({"券猫订单"})
public class QuanMaoCardOrder implements Serializable {
    /**
     *
     *   订单ID    <br>
     *<br>
     * 字段名： quan_mao_card_order.OrderId
     */
    @Description({"订单ID", "不能为空", "数据长度: 19"})
    @NonNull
    private Long orderId;

    /**
     *
     *   订购流水号    <br>
     *<br>
     * 字段名： quan_mao_card_order.OrderNumber
     */
    @Description({"订购流水号", "数据长度: 190"})
    private String orderNumber;

    /**
     *
     *   用户商户订单号    <br>
     *<br>
     * 字段名： quan_mao_card_order.MerchantsOrderNumber
     */
    @Description({"用户商户订单号", "数据长度: 190"})
    private String merchantsOrderNumber;

    /**
     *
     *   产品名称    <br>
     *<br>
     * 字段名： quan_mao_card_order.CardName
     */
    @Description({"产品名称", "数据长度: 255"})
    private String cardName;

    /**
     *
     *   产品编码    <br>
     *<br>
     * 字段名： quan_mao_card_order.CardNo
     */
    @Description({"产品编码", "数据长度: 19"})
    private Long cardNo;

    /**
     *
     *   卡类型(1直冲 2卡券)    <br>
     *<br>
     * 字段名： quan_mao_card_order.CardType
     */
    @Description({"卡类型(1直冲 2卡券)", "数据长度: 5"})
    private Integer cardType;

    /**
     *
     *   订单卡券总数    <br>
     *<br>
     * 字段名： quan_mao_card_order.CardNums
     */
    @Description({"订单卡券总数", "数据长度: 5"})
    private Integer cardNums;

    /**
     *
     *   订单状态 -1失败 0处理中 1成功    <br>
     *<br>
     * 字段名： quan_mao_card_order.Status
     */
    @Description({"订单状态 -1失败 0处理中 1成功", "数据长度: 5"})
    private Integer status;

    /**
     *
     *   订单备注    <br>
     *<br>
     * 字段名： quan_mao_card_order.Remarks
     */
    @Description({"订单备注", "数据长度: 500"})
    private String remarks;

    /**
     *
     *   付款时间    <br>
     *<br>
     * 字段名： quan_mao_card_order.PayTime
     */
    @Description({"付款时间", "数据长度: 50"})
    private String payTime;

    /**
     *
     *   完成时间    <br>
     *<br>
     * 字段名： quan_mao_card_order.FinallyTime
     */
    @Description({"完成时间", "数据长度: 50"})
    private String finallyTime;

    /**
     *
     *   充值账号    <br>
     *<br>
     * 字段名： quan_mao_card_order.ChargeAccount
     */
    @Description({"充值账号", "数据长度: 200"})
    private String chargeAccount;

    public static final Boolean NOT_DELETED = Deleted.NOT_DELETED.value();

    public static final Boolean IS_DELETED = Deleted.IS_DELETED.value();

    /**
     *
     *   逻辑删除    <br>
     *<br>
     * 字段名： quan_mao_card_order.Deleted
     */
    @Description({"逻辑删除", "不能为空", "数据长度: 1"})
    @NonNull
    private Boolean deleted;

    /**
     *
     *   创建用户    <br>
     *<br>
     * 字段名： quan_mao_card_order.CreateUser
     */
    @Description({"创建用户", "不能为空", "数据长度: 50"})
    @NonNull
    private String createUser;

    /**
     *
     *   创建时间    <br>
     *<br>
     * 字段名： quan_mao_card_order.CreateTime
     */
    @Description({"创建时间", "不能为空", "数据长度: 26"})
    @NonNull
    private Date createTime;

    /**
     *
     *   修改用户    <br>
     *<br>
     * 字段名： quan_mao_card_order.UpdateUser
     */
    @Description({"修改用户", "不能为空", "数据长度: 50"})
    @NonNull
    private String updateUser;

    /**
     *
     *   修改时间    <br>
     *<br>
     * 字段名： quan_mao_card_order.UpdateTime
     */
    @Description({"修改时间", "不能为空", "数据长度: 26"})
    @NonNull
    private Date updateTime;

    /**
     *
     *   订单卡密集合（直充、话费订单则无数据）    <br>
     *<br>
     * 字段名： quan_mao_card_order.OrderCardPassList
     */
    @Description({"订单卡密集合（直充、话费订单则无数据）", "数据长度: 65535"})
    private String orderCardPassList;

    private static final long serialVersionUID = 1L;

    /**
     * 获取参数<br><br>
     *
     *   订单ID    <br>
     *<br>
     * 字段名： quan_mao_card_order.OrderId
     */
    public Long getOrderId() {
        return orderId;
    }

    /**
     * 设置参数<br><br>
     *
     *   订单ID<br>
     *<br>
     * 字段名： quan_mao_card_order.OrderId
     */
    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    /**
     * 获取参数<br><br>
     *
     *   订购流水号    <br>
     *<br>
     * 字段名： quan_mao_card_order.OrderNumber
     */
    public String getOrderNumber() {
        return orderNumber;
    }

    /**
     * 设置参数<br><br>
     *
     *   订购流水号<br>
     *<br>
     * 字段名： quan_mao_card_order.OrderNumber
     */
    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber == null ? null : orderNumber.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   用户商户订单号    <br>
     *<br>
     * 字段名： quan_mao_card_order.MerchantsOrderNumber
     */
    public String getMerchantsOrderNumber() {
        return merchantsOrderNumber;
    }

    /**
     * 设置参数<br><br>
     *
     *   用户商户订单号<br>
     *<br>
     * 字段名： quan_mao_card_order.MerchantsOrderNumber
     */
    public void setMerchantsOrderNumber(String merchantsOrderNumber) {
        this.merchantsOrderNumber = merchantsOrderNumber == null ? null : merchantsOrderNumber.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   产品名称    <br>
     *<br>
     * 字段名： quan_mao_card_order.CardName
     */
    public String getCardName() {
        return cardName;
    }

    /**
     * 设置参数<br><br>
     *
     *   产品名称<br>
     *<br>
     * 字段名： quan_mao_card_order.CardName
     */
    public void setCardName(String cardName) {
        this.cardName = cardName == null ? null : cardName.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   产品编码    <br>
     *<br>
     * 字段名： quan_mao_card_order.CardNo
     */
    public Long getCardNo() {
        return cardNo;
    }

    /**
     * 设置参数<br><br>
     *
     *   产品编码<br>
     *<br>
     * 字段名： quan_mao_card_order.CardNo
     */
    public void setCardNo(Long cardNo) {
        this.cardNo = cardNo;
    }

    /**
     * 获取参数<br><br>
     *
     *   卡类型(1直冲 2卡券)    <br>
     *<br>
     * 字段名： quan_mao_card_order.CardType
     */
    public Integer getCardType() {
        return cardType;
    }

    /**
     * 设置参数<br><br>
     *
     *   卡类型(1直冲 2卡券)<br>
     *<br>
     * 字段名： quan_mao_card_order.CardType
     */
    public void setCardType(Integer cardType) {
        this.cardType = cardType;
    }

    /**
     * 获取参数<br><br>
     *
     *   订单卡券总数    <br>
     *<br>
     * 字段名： quan_mao_card_order.CardNums
     */
    public Integer getCardNums() {
        return cardNums;
    }

    /**
     * 设置参数<br><br>
     *
     *   订单卡券总数<br>
     *<br>
     * 字段名： quan_mao_card_order.CardNums
     */
    public void setCardNums(Integer cardNums) {
        this.cardNums = cardNums;
    }

    /**
     * 获取参数<br><br>
     *
     *   订单状态 -1失败 0处理中 1成功    <br>
     *<br>
     * 字段名： quan_mao_card_order.Status
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 设置参数<br><br>
     *
     *   订单状态 -1失败 0处理中 1成功<br>
     *<br>
     * 字段名： quan_mao_card_order.Status
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 获取参数<br><br>
     *
     *   订单备注    <br>
     *<br>
     * 字段名： quan_mao_card_order.Remarks
     */
    public String getRemarks() {
        return remarks;
    }

    /**
     * 设置参数<br><br>
     *
     *   订单备注<br>
     *<br>
     * 字段名： quan_mao_card_order.Remarks
     */
    public void setRemarks(String remarks) {
        this.remarks = remarks == null ? null : remarks.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   付款时间    <br>
     *<br>
     * 字段名： quan_mao_card_order.PayTime
     */
    public String getPayTime() {
        return payTime;
    }

    /**
     * 设置参数<br><br>
     *
     *   付款时间<br>
     *<br>
     * 字段名： quan_mao_card_order.PayTime
     */
    public void setPayTime(String payTime) {
        this.payTime = payTime == null ? null : payTime.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   完成时间    <br>
     *<br>
     * 字段名： quan_mao_card_order.FinallyTime
     */
    public String getFinallyTime() {
        return finallyTime;
    }

    /**
     * 设置参数<br><br>
     *
     *   完成时间<br>
     *<br>
     * 字段名： quan_mao_card_order.FinallyTime
     */
    public void setFinallyTime(String finallyTime) {
        this.finallyTime = finallyTime == null ? null : finallyTime.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   充值账号    <br>
     *<br>
     * 字段名： quan_mao_card_order.ChargeAccount
     */
    public String getChargeAccount() {
        return chargeAccount;
    }

    /**
     * 设置参数<br><br>
     *
     *   充值账号<br>
     *<br>
     * 字段名： quan_mao_card_order.ChargeAccount
     */
    public void setChargeAccount(String chargeAccount) {
        this.chargeAccount = chargeAccount == null ? null : chargeAccount.trim();
    }

    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * 获取参数<br><br>
     *
     *   逻辑删除    <br>
     *<br>
     * 字段名： quan_mao_card_order.Deleted
     */
    public Boolean getDeleted() {
        return deleted;
    }

    /**
     * 设置参数<br><br>
     *
     *   逻辑删除<br>
     *<br>
     * 字段名： quan_mao_card_order.Deleted
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    /**
     * 获取参数<br><br>
     *
     *   创建用户    <br>
     *<br>
     * 字段名： quan_mao_card_order.CreateUser
     */
    public String getCreateUser() {
        return createUser;
    }

    /**
     * 设置参数<br><br>
     *
     *   创建用户<br>
     *<br>
     * 字段名： quan_mao_card_order.CreateUser
     */
    public void setCreateUser(String createUser) {
        this.createUser = createUser == null ? null : createUser.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   创建时间    <br>
     *<br>
     * 字段名： quan_mao_card_order.CreateTime
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 设置参数<br><br>
     *
     *   创建时间<br>
     *<br>
     * 字段名： quan_mao_card_order.CreateTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取参数<br><br>
     *
     *   修改用户    <br>
     *<br>
     * 字段名： quan_mao_card_order.UpdateUser
     */
    public String getUpdateUser() {
        return updateUser;
    }

    /**
     * 设置参数<br><br>
     *
     *   修改用户<br>
     *<br>
     * 字段名： quan_mao_card_order.UpdateUser
     */
    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser == null ? null : updateUser.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   修改时间    <br>
     *<br>
     * 字段名： quan_mao_card_order.UpdateTime
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置参数<br><br>
     *
     *   修改时间<br>
     *<br>
     * 字段名： quan_mao_card_order.UpdateTime
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取参数<br><br>
     *
     *   订单卡密集合（直充、话费订单则无数据）    <br>
     *<br>
     * 字段名： quan_mao_card_order.OrderCardPassList
     */
    public String getOrderCardPassList() {
        return orderCardPassList;
    }

    /**
     * 设置参数<br><br>
     *
     *   订单卡密集合（直充、话费订单则无数据）<br>
     *<br>
     * 字段名： quan_mao_card_order.OrderCardPassList
     */
    public void setOrderCardPassList(String orderCardPassList) {
        this.orderCardPassList = orderCardPassList == null ? null : orderCardPassList.trim();
    }

    public enum Deleted {
        NOT_DELETED(new Boolean("false"), "未删除"),
        IS_DELETED(new Boolean("true"), "已删除");

        private final Boolean value;

        private final String name;

        Deleted(Boolean value, String name) {
            this.value = value;
            this.name = name;
        }

        public Boolean getValue() {
            return this.value;
        }

        public Boolean value() {
            return this.value;
        }

        public String getName() {
            return this.name;
        }
    }

    public enum Column {
        orderId("OrderId", "orderId", "BIGINT", false),
        orderNumber("OrderNumber", "orderNumber", "VARCHAR", false),
        merchantsOrderNumber("MerchantsOrderNumber", "merchantsOrderNumber", "VARCHAR", false),
        cardName("CardName", "cardName", "VARCHAR", false),
        cardNo("CardNo", "cardNo", "BIGINT", false),
        cardType("CardType", "cardType", "INTEGER", false),
        cardNums("CardNums", "cardNums", "INTEGER", false),
        status("Status", "status", "INTEGER", true),
        remarks("Remarks", "remarks", "VARCHAR", false),
        payTime("PayTime", "payTime", "VARCHAR", false),
        finallyTime("FinallyTime", "finallyTime", "VARCHAR", false),
        chargeAccount("ChargeAccount", "chargeAccount", "VARCHAR", false),
        deleted("Deleted", "deleted", "BIT", false),
        createUser("CreateUser", "createUser", "VARCHAR", true),
        createTime("CreateTime", "createTime", "TIMESTAMP", false),
        updateUser("UpdateUser", "updateUser", "VARCHAR", false),
        updateTime("UpdateTime", "updateTime", "TIMESTAMP", false),
        orderCardPassList("OrderCardPassList", "orderCardPassList", "LONGVARCHAR", false);

        private static final String BEGINNING_DELIMITER = "`";

        private static final String ENDING_DELIMITER = "`";

        private final String column;

        private final boolean isColumnNameDelimited;

        private final String javaProperty;

        private final String jdbcType;

        public String value() {
            return this.column;
        }

        public String getValue() {
            return this.column;
        }

        public String getJavaProperty() {
            return this.javaProperty;
        }

        public String getJdbcType() {
            return this.jdbcType;
        }

        Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
            this.column = column;
            this.javaProperty = javaProperty;
            this.jdbcType = jdbcType;
            this.isColumnNameDelimited = isColumnNameDelimited;
        }

        public String desc() {
            return this.getEscapedColumnName() + " DESC";
        }

        public String asc() {
            return this.getEscapedColumnName() + " ASC";
        }

        public static Column[] excludes(Column ... excludes) {
            ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
            if (excludes != null && excludes.length > 0) {
                columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
            }
            return columns.toArray(new Column[]{});
        }

        public String getEscapedColumnName() {
            if (this.isColumnNameDelimited) {
                return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
            } else {
                return this.column;
            }
        }
    }
}